'use strict'

import React, { Component } from 'react'
import {
  Route,
  IndexRoute,
  Router,
  hashHistory,
  withRouter,
} from 'react-router'
import { render } from 'react-dom'
import { LoginPage } from './components/user'

class App extends Component {
  render() {
    return (
      <div>
        {React.cloneElement(this.props.children, this.props)}
      </div>
    )
  }
}

const routes = (
  <Route path="/" component={App}>
    <IndexRoute component={LoginPage} />
  </Route>
)

render(
  <Router history={hashHistory} routes={routes} />,
  document.getElementById('app')
)